import request from "@/api";

// 根据id获取详情
export function getById(id) {
  return request({
    url: "/api/article/getById",
    method: "get",
    params: {
      id: id,
    },
  });
}

// 获取全部菜单
export function listAllMenus() {
  return request({
    url: "/api/category/listAllMenus",
    method: "get",
    params: {},
  });
}

// 根据关键词获取文章列表
export function getArticleListByKeyword(keyword) {
  return request({
    url: "/api/article/getArticleListByKeyword",
    method: "get",
    params: {
      keyword: keyword,
    },
  });
}
